import axios from '@/utils/request'

const api = {
  getDeviceInfoList: '/deviceInfo/list', // 获取通道列表
  deleteCheckedApi: '/deviceInfo/delete', // 删除选中条
  addDeviceInfoList: '/deviceInfo/add', // 添加
  editDeviceInfoList: '/deviceInfo/edit', // 添加
  getDeviceInfoById: 'deviceInfo/getById'
}



// 获取通道列表
export function getDeviceInfoList (data) {
  return axios({
    url: api.getDeviceInfoList,
    method: 'post',
    data
  })
}


export function getDeviceInfoById (data) {
  return axios({
    url: api.getDeviceInfoById,
    method: 'post',
    data
  })
}

// 删除选中条
export function deleteCheckedApi (data) {
  return axios({
    url: api.deleteCheckedApi,
    method: 'post',
    data
  })
}

// 开始任务
export function startTask (data) {
  return axios({
    url: api.startTaskApi,
    method: 'post',
    data
  })
}

// 停止任务
export function stopTask (data) {
  return axios({
    url: api.stopTaskApi,
    method: 'post',
    data
  })
}

// 添加通道
export function addDeviceInfoList (data) {
  return axios({
    url: api.addDeviceInfoList,
    method: 'post',
    data
  })
}

// 编辑通道
export function editDeviceInfoList (data) {
  return axios({
    url: api.editDeviceInfoList,
    method: 'post',
    data
  })
}

// 添加星历任务
export function createXingliTask (data) {
  return axios({
    url: api.createXingliTaskApi,
    method: 'post',
    data
  })
}

// 添加侦察任务
export function createZcTask (data) {
  return axios({
    url: api.createZcTaskApi,
    method: 'post',
    data
  })
}
